﻿using System.ComponentModel.DataAnnotations;
using YNTK.Common.Enum;
using YNTK.Dependency;

namespace YNTK.Employees.Entitys.Dto
{
    /// <summary>
    /// 当前登录用户完善个人信息请求模型
    /// </summary>
    [SuppressSniffer]
    public class EmployeesEditInfoRequestModel
    {
        /// <summary>
        /// 当前登录用户id
        /// </summary>
        [Required(ErrorMessage = "用户唯一标识不能为空")]
        public string id { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [Required(ErrorMessage = "用户名不能为空")]
        public string account { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        [Required(ErrorMessage = "姓名不能为空")]
        public string realName { get; set; }

        /// <summary>
        /// 身份证号码
        /// </summary>
        [Required(ErrorMessage = "身份证号码不能为空")]
        [RegularExpression(@"(^\d{18}$)|(^\d{15}$)|(^\d{17}(\d|X|x)$)", ErrorMessage = "请输入正确的身份证号")]
        public string certificatesNumber { get; set; }

        /// <summary>
        /// 性别(0.男 1.女)
        /// </summary>
        [Required(ErrorMessage = "性别不能为空")]
        public SexEnum sex { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        [Required(ErrorMessage = "手机号码不能为空"), RegularExpression(@"^\+?\d{0,4}?[1][3-8]\d{9}$", ErrorMessage = "请输入正确的手机号")]
        public string mobilePhone { get; set; }

        /// <summary>
        /// 电话
        /// </summary>
        public string telePhone { get; set; }

        /// <summary>
        /// 固定电话
        /// </summary>
        public string landline { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        [DataType(DataType.EmailAddress)]
        [RegularExpression("^[\\w-]+@[\\w-]+\\.(com|net|org|edu|mil|tv|biz|info)$", ErrorMessage = "邮箱格式错误请输入正确的邮箱")]
        [StringLength(160, ErrorMessage = "邮箱太长了")]
        public string email { get; set; }

        /// <summary>
        /// 民族
        /// </summary>
        public string nation { get; set; }

        /// <summary>
        /// 籍贯
        /// </summary>
        public string nativePlace { get; set; }

        /// <summary>
        /// 户籍地址
        /// </summary>
        public string domicileAddress { get; set; }

        /// <summary>
        /// 常住地址
        /// </summary>
        public string permanentAddress { get; set; }

        /// <summary>
        /// 最高学历(0.学前教育 1.小学 2.初中 3.中专 4.高中 5.专科 6.本科 7.硕士研究生 8.博士研究生)
        /// </summary>
        [Required(ErrorMessage = "请选择最高学历")]
        public EducationEnum education { get; set; }

        /// <summary>
        /// 出生日期
        /// </summary>
        [Required(ErrorMessage = "请选择出生日期")]
        public DateTime? dateBirth { get; set; }

        /// <summary>
        /// 婚姻状态(0.未婚 1.已婚 2.丧偶 3.离异 4.其它)
        /// </summary>
        [Required(ErrorMessage = "请选择婚姻状态")]
        public MaritalStateEnum maritalState { get; set; }

        /// <summary>
        /// 政治面貌(0.中共党员 1.中共预备党员 2.共青团员 3.无党派人士 4.群众)
        /// </summary>
        [Required(ErrorMessage = "请选择政治面貌")]
        public PoliticalLandscapeEnum politicalLandscape { get; set; }

        /// <summary>
        /// 入党日期
        /// </summary>
        public DateTime? partyDate { get; set; }

        /// <summary>
        /// 户口性质(0.农业户口 1.居民户口 2.农村户口 3.集体户口)
        /// </summary>
        [Required(ErrorMessage = "请选择户口性质")]
        public HouseholdRegisterEnum householdRegister { get; set; }

        /// <summary>
        /// 工资卡号
        /// </summary>
        [RegularExpression(@"/^([1-9]{1})(\d{14}|\d{18})$/", ErrorMessage = "工资卡号格式错误请输入正确的工资卡号")]
        public string wagesCardNumber { get; set; }

        /// <summary>
        /// 开户行
        /// </summary>
        public string bankDeposit { get; set; }

        /// <summary>
        /// 网点
        /// </summary>
        public string branches { get; set; }

        /// <summary>
        /// 头像/个人照片服务器存储路径
        /// </summary>
        public string headIcon { get; set; }

        /// <summary>
        /// 身份证正面服务器存储路径
        /// </summary>
        public string frontIdentityCard { get; set; }

        /// <summary>
        /// 身份证反面服务器存储路径
        /// </summary>
        public string reverseSideIdentityCard { get; set; }

        /// <summary>
        /// 个人简历文件服务器存储路径
        /// </summary>
        public string curriculumVitae { get; set; }

        /// <summary>
        /// 在岗情况(0.正常 1.请假 2.出差)
        /// </summary>
        [Required(ErrorMessage = "请选择在岗情况")]
        public DutyStateEnum dutyState { get; set; }

        /// <summary>
        /// 签名文件图片服务器存储路径
        /// </summary>
        public string signature { get; set; }

    }
}
